Question on grid area in a single-point simulation?

Status
Not open for further replies.

mengqi

mj
Member
Hi,

Q1: In the domainMod.F90, what is the difference between the "ldomain%ns" and "ldomain%area"? For "ldomain%ns", it states the global size of the domain; For "ldomain%area", it states the grid cell area. I feel a little bit confused here.

Q2: when I tried to print "ldomain%area" using write(iulog,*)'grc_area_test = ', ldomain%area. That is "1e36". On the other hand, ldomain%ns is "1".
However, I noticed that the area is 11149.6 km2 in the surface data. Thus, I am not sure how come they are different.

I really appreciate any information anyone can provide!!

MJ
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I believe ns is the domain size (ni X nj, where ni would be the number of longitude grid cells and nj is the number of latitude grid cells, so for a single point simulation ni X nj = 1 X 1 = 1).
Not sure why area would be 1e36 when you are printing it out.
You can check the domain information in the lnd log file. For example, for a recent single-point case I've run:

domain_check set = domain_set
domain_check decomped = F
domain_check ns = 1
domain_check ni,nj = 1 1
domain_check nbeg,nend = 1 1
domain_check lonc = 145.010000000000 145.010000000000
domain_check latc = -37.7300000000000 -37.7300000000000
domain_check mask = 1 1
domain_check frac = 1.00000000000000 1.00000000000000
domain_check area = 97.7964772033574 97.7964772033574
domain_check pftm = -9999 -9999

So here the area appears to be about 98 km^2.
 

mengqi

mj
Member
I believe ns is the domain size (ni X nj, where ni would be the number of longitude grid cells and nj is the number of latitude grid cells, so for a single point simulation ni X nj = 1 X 1 = 1).
Not sure why area would be 1e36 when you are printing it out.
You can check the domain information in the lnd log file. For example, for a recent single-point case I've run:

domain_check set = domain_set
domain_check decomped = F
domain_check ns = 1
domain_check ni,nj = 1 1
domain_check nbeg,nend = 1 1
domain_check lonc = 145.010000000000 145.010000000000
domain_check latc = -37.7300000000000 -37.7300000000000
domain_check mask = 1 1
domain_check frac = 1.00000000000000 1.00000000000000
domain_check area = 97.7964772033574 97.7964772033574
domain_check pftm = -9999 -9999

So here the area appears to be about 98 km^2.
Thank you so much! It really helps!

I would have one more question. I tried to check the keyword "domain_check xxx" in the log file; however, they do not exist there. Thus, I tried to check the relevant code in the domainMod.F90. I found these codes below, suggesting that my code did not loop these stuff.

if (masterproc) then
write(iulog,*) ' domain_check set = ',trim(domain%set)
....
write(iulog,*) ' domain_check area = ',minval(domain%area),maxval(domain%area)
....
endif


Therefore, I tried to track the keyword "masterproc". In the spmdMod.F90, it wrote:

if (iam==0) then
masterproc = .true.
else
masterproc = .false.
end if


It should be noted that "iam" refers to the processor number. As a result, I cannot understand it. I am not sure how I revise the iam.

For your reference, I also attached the command about "create the case" below:

./create_newcase --case ~/clm_mengqi_cases/I2000_CTSM_singlept --res CLM_USRDAT --compset I2000Clm51BgcCrop --project UIUC0025 --run-unsupported --user-mods-dirs /glade/scratch/mengqij/my_subset_data_Bo1_c/user_mods

Sorry for any inconvenience caused. Looking forward to your insights!

MJ
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Those statements are contained within the "if(masterproc" so that only the master processor writes that output. That way you don't have every processor writing out that output. That is important for regional or global simulations where multiple processors are being used. For single-point it wouldn't matter because only one processor should be used.
What version of CTSM are you using? If you are using a more recent version then I don't think you would get that output. More recent versions use the NUOPC driver, which uses mesh files, not domain files. I don't think the subroutine "domain_check" is called when using the NUOPC driver.
 

mengqi

mj
Member
Those statements are contained within the "if(masterproc" so that only the master processor writes that output. That way you don't have every processor writing out that output. That is important for regional or global simulations where multiple processors are being used. For single-point it wouldn't matter because only one processor should be used.
What version of CTSM are you using? If you are using a more recent version then I don't think you would get that output. More recent versions use the NUOPC driver, which uses mesh files, not domain files. I don't think the subroutine "domain_check" is called when using the NUOPC driver.
Thank you for your clarification!

I guess the version of my code is clm5.1. As you mentioned, the version may use the NUOPC driver, and thus I cannot print something like "domain_check xxxxx".

In this context, I tried to find mesh_area in the log file but failed. I was wondering if there is no "area" output in the log file when using NUOPC driver. In other words, I will have to write some codes about "print the area value".

Thanks!
 
Status
Not open for further replies.
Back
Top