Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

how to delete some new variable from namelist and F90 code

xiaoxiaokuishu

Ru Xu
Member
Hi, all

The model I'm using with palm tree functionality is based on ctsm1.dev040 (I runs well), but this version doesn't have SSP, so I need to upgrade my development version to the nearest version that does have SSP, which is ctsm1.dev090, and by upgrade I mean copying the src folder of ctsm1.dev040 directly to ctsm1.dev090, because the main code changes are made in the src folder (comment with Y.Fan).

But even so, there are a lot of differences between the two versions, for example the new version adds some new variables and such like fates_parteh_mode.
I can successfully build and submit, but when the model run, the lnd.log prompts.

ERROR: ERROR reading clm_inparm namelistERROR in /mnt/lustre/a2fs-work2/work/n02/n02/ruxu/cesm/CESM/ctsm1dev093/src/main/controlMod.F90 at line 323


I suspect a mismatch between some of the default parameters and the old version of the code after I replaced the default src in ctsm1.dev090.. May be I should match the variable in F90 and In namelists..
I don't know if this can be resolved by deleting all code related to the new ctsm1.dev090 variables.
I attached my src and log file for your reference. Any help will be helpful….

I can not attach src folder as it is too large.. But i atthach log files for your reference..

Best
Ru
 

Attachments

  • error_file.zip
    10.5 KB · Views: 0

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I think the best way to update your code from ctsm1.dev040 to ctsm1.dev090 is to use git. It will automatically merge the codes (you might want to do it in steps) and identify conflicts that you can resolve one by one.
Alternatively, you could setup an SSP case in ctsm1.dev090, and then see if you can replicate it manually in ctsm1.0.dev040.
 

xiaoxiaokuishu

Ru Xu
Member
I think the best way to update your code from ctsm1.dev040 to ctsm1.dev090 is to use git. It will automatically merge the codes (you might want to do it in steps) and identify conflicts that you can resolve one by one.
Alternatively, you could setup an SSP case in ctsm1.dev090, and then see if you can replicate it manually in ctsm1.0.dev040.
Hi, Oleson,
Thanks for the reply! For the first method, do you have some instructions of how to do that,
is it git branch? i did not have exprience do that before...

Best
Ru
 

xiaoxiaokuishu

Ru Xu
Member
I think the best way to update your code from ctsm1.dev040 to ctsm1.dev090 is to use git. It will automatically merge the codes (you might want to do it in steps) and identify conflicts that you can resolve one by one.
Alternatively, you could setup an SSP case in ctsm1.dev090, and then see if you can replicate it manually in ctsm1.0.dev040.

Hi, Oleson,

I am now try your second method, that is create a ssp126 case under ctsm1.dev090, then copy the datm.stream*
to ctsm1.0.dev040 run folder.
The model build and submit well, but when the model runs,
the below error from atm.log, I never seen this error before (I run regional case)

('shr_map_getWts') ERROR: yd outside bounds -15.750000000000000
('shr_map_getWts') cpole = 1.5707963267948966
ERROR: ('shr_map_getWts') ERROR yd outside 90 degree bounds

Do you have any suggestions?

Best
 

Attachments

  • palm-ssp.zip
    44.3 KB · Views: 1

oleson

Keith Oleson
CSEG and Liaisons
Staff member
It seems to be having trouble mapping the anomaly forcing to your domain (/work/n02/n02/ruxu/cesm/CESM/cesm_inputdata/my_data_op_region/domain.lnd.360x720cru_oRRS15to5_90.0-130.0_-16.0-16.0_c250206.nc). This post may be helpful:

 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Actually, it could also be how you've set mapalgo for the CO2 stream. Change it from "bilinear" to "nn". The CO2 file has a lat/lon dimension of 1/1, so bilinear won't work.
 

xiaoxiaokuishu

Ru Xu
Member
Actually, it could also be how you've set mapalgo for the CO2 stream. Change it from "bilinear" to "nn". The CO2 file has a lat/lon dimension of 1/1, so bilinear won't work.
Hi, Oleson

The post you shared is very helpful. I comment the checkRad function in shr_map_mod.F90 (it means my grid is always degrees not radians). The model works!!!
But I do not know why, my code works well for historical simulation, now for SSP, the error appears.
!--- is lat/lon degrees or radians? ---
cang = 360._SHR_KIND_R8
units = 'degrees'
!if (shr_map_checkRad(Ysrc)) then
! cang=c2*pi
! units = 'radians'
!endif

I think you are correct, you mention the problem is from co2 setting..
Regarding the co2 setting, I have some confusions about how model read and use co2

As the ctsm1.0dev040 did not create datm.streams.txt.co2tseries.SSP1-2.6
So I copy this from other places(ctsm1dev090), and set

./xmlchange CCSM_BGC=CO2A

My model runs well. But I have checked the lnd_in under run folder, it is:

co2_ppmv = 284.7
co2_type = 'constant'


Then I check the atm.log file, it seems the model really read is the SSPCO2 timeseries

(shr_dmodel_readstrm) file ub: /CESM/cesm_inputdata//atm/datm7/CO2/fco2_datm_globalSSP1-2.6__simyr_2014-2501_CMIP6_c190506.nc 27

So I am very confused is my model use the constant co2 (284.7) or use the timeseries co2?
Is there any way to evidence what the model really use or some evidence from model output?
Sometimes, the model did not really use the all settings in lnd_in right?
I hope my model use timeseries co2 as opposed to the constant one...
I attached all the helpful files for your reference.....

Best
 

Attachments

  • palm-ssp126.zip
    729.8 KB · Views: 1

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Judging from the atm log, it looks like it's working. Plot the CO2 from the history output to make sure. Normally, co2_type = 'diagnostic', but it might not matter since you've specified the co2 stream. You could set CLM_CO2_TYPE to diagnostic and then it should show up in co2_type.
 

xiaoxiaokuishu

Ru Xu
Member
Judging from the atm log, it looks like it's working. Plot the CO2 from the history output to make sure. Normally, co2_type = 'diagnostic', but it might not matter since you've specified the co2 stream. You could set CLM_CO2_TYPE to diagnostic and then it should show up in co2_type.

Hi, Oleson,
I can only find one variable related with CO2, but it seems it is not the one you mention?
loat PCO2(time, lat, lon) ;
PCO2:long_name = "atmospheric partial pressure of CO2" ;
PCO2:units = "Pa" ;
PCO2:cell_methods = "time: mean" ;
PCO2:_FillValue = 1.e+36f ;
PCO2:missing_value = 1.e+36f ;

Best
Ru
 

xiaoxiaokuishu

Ru Xu
Member
CLM_CO2_TYPE is an xml variable in env_run.xml
Hi, Oleson,

I have confirmed now ,if I set
co2_ppmv = 284.7
co2_type = 'constant'
,even I set SSPco2timeseries, even the model really read it, the model still run the constant co2.

Only I set co2 as diagnostic and then SSPco2 timeseries, the model would really read transient future CO2!

Thanks for all the help!!

Best
 
Top